﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Enterprise.Management.Data;

namespace Enterprise.Management.Business
{
    public class DictBLL : BaseBLL
    {
        public List<DP_Dictionary> GetDictionaries(DictType type)
        {
            return DataContext.DP_Dictionary.Where(m => m.Dict_ID == (int)type).ToList();
        }

        public string GetDictName(DictType type, int value)
        {
            return DataContext.DP_Dictionary.First(m => m.Dict_ID == (int)type && m.Dict_Value == value).Dict_Name;
        }
    }
}